#include"common.hpp"

int main()
{
    //这里是获取管道文件
    int fd=open(ipcPath.c_str(),O_RDONLY);
    if(fd < 0)
    {
        perror("open");
        exit(1);
    }

    string buffer;
    while(true)
    {
        cout<<"Please Enter Message Line:>";
        //从cin输入流当中读取一行字符串
        getline(cin,buffer);
        write(fd,buffer.c_str(),buffer.size());
    }
    close(fd);
    return 0;
}